<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <title>服务归档</title>
<head>

<link href="../../jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="../../jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../jquery/bs_pagination/jquery.bs_pagination.min.css">
<script type="text/javascript" src="../../jquery/bs_pagination/jquery.bs_pagination.min.js"></script>
<script type="text/javascript" src="../../jquery/bs_pagination/en.js"></script>
<script type="application/javascript" src="../../jquery/commons/common.js"></script>
<link href="../../jquery/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="../../jquery/bootstrap-datetimepicker-master/locale/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript">

    $(function(){

        //时间组件
        $(".time").datetimepicker({
            minView: "month",
            language:  'zh-CN',
            format: 'yyyy-mm-dd',
            autoclose: true,
            todayBtn: true,
            pickerPosition: "bottom-left"
        });


        //为全选的复选框绑定事件，触发全选操作
        $("#qx").click(function () {

            $("input[name=xz]").prop("checked",this.checked);

        });


        //对创建人下拉框赋值
        function getSysUserList(){
            $.ajax({

                url : "sysUser/getSysUserList",
                type : "get",
                dataType : "json",
                success : function (data) {

                    var html = "<option>${sysUser.userName}</option>";

                    //遍历出来的每一个n，就是每一个user对象
                    $.each(data,function (i,n) {
                         html += "<option value='"+n.userId+"'>"+n.userName+"</option>";
                    });


                    $("#svrDealBy").html(html);
                }

            });
        }
        getSysUserList();


        //进入页面给页面赋值
        $.ajax({
            url : "handleservice/initSctService/"+getQueryString("svrId"),
            type : "get",
            dataType : "json",
            success : function (data) {
                //给页面对应输入框赋值
                $("#svrId").html(data.sctService.svrId);
                /*隐藏域赋值*/
                $("#svrIds").val(data.sctService.svrId);
                $("#svrType").html(data.sctService.svrType);
                $("#svrTitle").html(data.sctService.svrTitle);
                $("#svrCustName").html(data.sctService.svrCustName);
                $("#svrStatus").html(data.sctService.svrStatus);
                $("#svrRequest").html(data.sctService.svrRequest);
                $("#svrCreateBy").html(data.sctService.svrCreateBy);
                $("#svrCreateDate").html(new Date(data.sctService.svrCreateDate).format("yyyy-MM-dd"));
                $("#svrDueTo").html(data.sctService.svrDueTo);
                $("#svrDueDate").html(new Date(data.sctService.svrDueDate).format("yyyy-MM-dd"));
                $("#svrDealBy").html(data.sctService.svrDealBy);
                $("#svrDealDate").html(new Date(data.sctService.svrDealDate).format("yyyy-MM-dd"));
                $("#svrDeal").html(data.sctService.svrDeal);
                $("#svrResult").html(data.sctService.svrResult);
                if (data.sctService.svrSatisfy == 1){
                    $("#svrSatisfy").html("★");
                }else if (data.sctService.svrSatisfy == 2){
                    $("#svrSatisfy").html("★★");

                }else if (data.sctService.svrSatisfy == 3){
                    $("#svrSatisfy").html("★★★");

                }else if (data.sctService.svrSatisfy == 4){
                    $("#svrSatisfy").html("★★★★");
                }else {
                    $("#svrSatisfy").html("★★★★★");
                }
            }
         });


        Date.prototype.format = function(fmt) {
            var o = {
                "M+" : this.getMonth() + 1, // 月份
                "d+" : this.getDate(), // 日
                "h+" : this.getHours(), // 小时
                "m+" : this.getMinutes(), // 分
                "s+" : this.getSeconds(), // 秒
                "q+" : Math.floor((this.getMonth() + 3) / 3), // 季度
                "S" : this.getMilliseconds()
                // 毫秒
            };
            if (/(y+)/.test(fmt))
                fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "")
                    .substr(4 - RegExp.$1.length));
            for ( var k in o)
                if (new RegExp("(" + k + ")").test(fmt))
                    fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k])
                        : (("00" + o[k]).substr(("" + o[k]).length)));
            return fmt;
        }

    });

</script>

<body>
<!-- 返回按钮 -->
<div style="position: relative; top: 35px; left: 10px;">
    <a href="javascript:void(0);" onclick="window.history.back();"><span class="glyphicon glyphicon-arrow-left" style="font-size: 20px; color: #DDDDDD"></span></a>
</div>

<!-- 大标题 -->
<div style="position: relative; left: 40px; top: -30px;">
    <div class="page-header">
        <h3>服务反馈</h3>
    </div>
</div>

<%--用于存储服务信息svrId--%>
<input type="hidden" id="svrIds">
<br/><br/>
<%--服务信息--%>
<div style="position: relative; top: -70px;">
    <div style="position: relative; left: 40px; height: 30px;">
        <div style="width: 300px; color: gray;">编号</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrId"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">服务类型</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrType"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>


    <div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">概要</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrTitle"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">服务请求</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrRequest"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>

	<div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">客户</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrCustName"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">状态</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrStatus"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>


    <div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">创建人</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrCreateBy"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">分配</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrDueTo"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>

    <div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">创建时间</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrCreateDate"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">分配时间</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrDueDate"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>

    <div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">处理人</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrDealBy"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">处理时间</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrDealDate"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>

    <div style="position: relative; left: 40px; height: 30px; top: 40px;">
        <div style="width: 300px; color: gray;">服务处理</div>
        <div style="width: 500px;position: relative; left: 200px; top: -20px;" id="svrDeal"><b>&nbsp;&nbsp;</b></div>
        <div style="height: 1px; width: 550px; background: #D5D5D5; position: relative; top: -20px;"></div>
    </div>

    <br/><br/><br/>


    <div style="position: relative; left: 40px; height: 30px; top: 10px;">
        <div style="width: 300px; color: gray;">处理结果</div>
        <div style="width: 300px;position: relative; left: 200px; top: -20px;" id="svrResult"><b></b></div>
        <div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">满意度</div>
        <div style="width: 300px;position: relative; left: 650px; top: -60px;" id="svrSatisfy"><b></b></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
        <div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
    </div>


</div>

</body>
</html>
